$(function (){

    $("#go").on('click',function (){
        var count = parseInt($("#aa").val());
        var totalPage = parseInt($("#totalPage").val());
        if (count>=1&&count<=totalPage){
            location.href = "http://localhost:8080/address/limitAddress?currentPageNo="+count;
        }else {
            alert("请输入正确的页码")
        }
    })

    $("#toAdd").on('click',function (){
        location.href = "http://localhost:8080/address/toAddAddress";
    })
    $(".chakan").on('click',function (){
        $.ajax({
            type:"GET",
            url: "http://localhost:8080/address/getAddressId/"+$(this).attr("addressId"),
            dataType: "JSON",
            success:function (data){
                // $("#show").text(JSON.stringify(data));
                $("#show").text(data.postCode);
            }
        })
    })

})
